#!/bin/sh
#
### BEGIN INIT INFO
# Provides:          ldirectord
# Required-Start:    $remote_fs $syslog
# Required-Stop:     $remote_fs $syslog
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
### END INIT INFO
#
# Author: Horms <horms@verge.net.au>
#
# Debian init script for ldirectord
#

NAME=ldirectord
DAEMON="@sbindir@/$NAME"
CONFIG="@sysconfdir@/default/$NAME"

test -x $DAEMON || exit 0

CONFIG_FILE=""
[ -f "$CONFIG" ] && . "$CONFIG"
CONFIG_FILE="${CONFIG_FILE:=ldirectord.cf}"

case "$1" in
	start|stop|restart|try-restart|status|reload|force-reload)
        	exec "$DAEMON" $1
		;;
	*)
		echo "Usage: /etc/init.d/$NAME" \
			"{start|stop|restart|try-restart|status|reload|force-reload}" >&2
    	exit 1
	;;
esac
